gsr
05/28/2024, 7:49 PM<cffunction name="removeDivsWithClass" access="public" returntype="string" output="false">
<cfargument name="inputString" type="string" required="yes">
<cfset var cleanedString = arguments.inputString>
<cfset cleanedString = reReplaceNoCase(cleanedString, "<div[^>]*class\\s*=\\s*[\"']preclass[\"'][^>]*>", "", "ALL")>
<cfset cleanedString = reReplaceNoCase(cleanedString, "</div>", "", "ALL")>
<!--- Note: This is a simplistic approach and might not cover all cases perfectly --->
<cfset cleanedString = reReplaceNoCase(cleanedString, "<div>", "", "ALL")>
<cfset cleanedString = reReplaceNoCase(cleanedString, "</div>", "", "ALL")>
<!--- Return the cleaned string --->
<cfreturn cleanedString>
</cffunction>
don't see any issues in this code
error <cfset cleanedString = reReplaceNoCase(cleanedString, "div[^]*class\\s*=\\s*[\"']preclass[\"'][^>]*>", "", "ALL")>
*MESSAGE*Invalid Syntax Closing [)] for function [rereplacenocase] not found*STACKTRACE*The Error Occurred in
tags.cfc: line 769
> 767:
> 768:
> *769: <cfset cleanedString = reReplaceNoCase(cleanedString, "div[^]*class\\s*=\\s*[\"']preclass[\"'][^>]*>", "", "ALL")>*Matt Jones
05/28/2024, 8:02 PMAdam Cameron